import { defineComponent, reactive, toRefs, computed } from 'vue'

import { use样式 } from 'amtf/hooks'
import {
  getValByUnit,
  拼组件名,
  isFunction,
  isBoolean,
  getRandomId,
} from 'amtf/utils'
const 主名 = 'table-body-tr-scrolling'
const 组件名 = 拼组件名(主名)

export default defineComponent({
  name: 组件名,
  props: {
    colgroups: {
      type: Array,
      required: true,
    },
  },
  setup(props) {
    const { 拼样式名_table直属 } = use样式(主名)

    const trClass = computed(() => {
      let result = null
      result = {
        [拼样式名_table直属('body-tr')]: true,
        [拼样式名_table直属('body-row-scrolling')]: true,
      }
      return result
    })

    return () => (
      <tr class={trClass.value}>
        <td colSpan={props.colgroups.length}></td>
      </tr>
    )
  },
})
